object dm: Tdm
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Height = 357
  Width = 709
  object UC: TUniConnection
    ProviderName = 'PostgreSQL'
    Port = 5433
    Database = 'zrl'
    SpecificOptions.Strings = (
      'SQLite.UseUnicode=True'
      'SQLite.ClientLibrary=sqlite3.dll'
      'SQLite.DefaultCollations=False'
      'PostgreSQL.UseUnicode=True')
    Options.DisconnectedMode = True
    Username = 'postgres'
    Password = 'Aj517xM_L723'
    Server = '192.168.1.134'
    LoginPrompt = False
    BeforeConnect = UCBeforeConnect
    Left = 88
    Top = 8
  end
  object q_org: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO org'
      '  (Name, kod, adress, direktor, glbuh)'
      'VALUES'
      '  (:Name, :kod, :adress, :direktor, :glbuh)')
    Connection = UC
    SQL.Strings = (
      'select *'
      'from'
      'enterprise.org')
    Options.SetFieldsReadOnly = False
    Left = 88
    Top = 104
  end
  object ds_org: TUniDataSource
    DataSet = q_org
    OnStateChange = ds_orgStateChange
    Left = 88
    Top = 56
  end
  object SQLiteUniProvider1: TSQLiteUniProvider
    Left = 16
    Top = 8
  end
  object ds_ym_nod: TUniDataSource
    DataSet = q_ym_nod
    Left = 136
    Top = 56
  end
  object q_ym_nod: TUniQuery
    Connection = UC
    SQL.Strings = (
      'with a as ('
      
        'select substr(t.godmesn,1,4) as YEAR, CAST(null as varchar) as r' +
        'oot, substr(t.godmesn,1,4)||'#39' '#1088'.'#39' as name_desc'
      'FROM'
      'enterprise.payroll t'
      'group by substr(t.godmesn,1,4)'
      ''
      'union all'
      'SELECT s.godmesn, substr(s.godmesn,1,4),m.month_name'
      
        'from enterprise.payroll s left outer join enterprise.month m on ' +
        'cast(s.godmesn as integer)%100=m.month_number'
      'GROUP by s.godmesn,m.month_name'
      ''
      'union all'
      
        'SELECT t.godmesn||t.tab_no,t.godmesn,t.tab_no||'#39'_'#39'||w.surname||'#39 +
        ' '#39'||substr(w.name,1,1)||'#39'. '#39'||substr(w.midle_name,1,1)||'#39'.'#39
      
        'FROM enterprise.payroll t left outer join enterprise.workers w o' +
        'n t.tab_no=w.tab_no'
      'group by t.godmesn,t.tab_no,w.surname,w.name,w.midle_name'
      ')'
      ''
      
        'SELECT CAST(a.year as varchar(15)), cast(a.root as varchar(15)),' +
        ' cast(a.name_desc as varchar(20))'
      'from a'
      'order by year')
    Options.SetFieldsReadOnly = False
    Left = 136
    Top = 104
  end
  object q_zrl: TUniQuery
    Connection = UC
    SQL.Strings = (
      
        'select t.godmesr,t.godmesn,t.tab_no,t.knuz||'#39' '#39'||k.name_full as ' +
        'knuz,'
      
        'CASE when substr (k.knuz_kind,1,5)='#39#1053#1072#1088#1072#1093#39' THEN t.summa end as s' +
        'umma_n,'
      
        'CASE when substr (k.knuz_kind,1,5)='#39#1059#1090#1088#1080#1084#39' THEN t.summa end as s' +
        'umma_u'
      ',t.cf,t.df'
      'from enterprise.payroll t left outer JOIN enterprise.knuz k '
      #9'on t.knuz=k.knuz'
      'WHERE t.tab_no=:atab and t.godmesr=:agodmesr')
    Options.SetFieldsReadOnly = False
    Left = 184
    Top = 104
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'atab'
      end
      item
        DataType = ftUnknown
        Name = 'agodmesr'
      end>
  end
  object ds_zrl: TUniDataSource
    DataSet = q_zrl
    Left = 184
    Top = 56
  end
  object ds_work: TUniDataSource
    DataSet = q_work
    Left = 224
    Top = 56
  end
  object ds_work_data: TUniDataSource
    DataSet = q_work_data
    OnStateChange = ds_work_dataStateChange
    Left = 280
    Top = 56
  end
  object q_work: TUniQuery
    Connection = UC
    SQL.Strings = (
      
        'select w.key,w.tab_no, CAST(w.surname||'#39' '#39'||substr(w.name,1,1)||' +
        #39'. '#39'|| substr(w.midle_name,1,1)||'#39'.'#39' as varchar(20))as fio,w.idk' +
        'od'
      'from enterprise.workers w')
    Options.SetFieldsReadOnly = False
    Left = 224
    Top = 104
  end
  object q_work_data: TUniQuery
    SQLDelete.Strings = (
      'DELETE FROM enterprise.workers'
      'WHERE'
      '  key = :Old_key')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.workers'
      'WHERE'
      '  key = :Old_key'
      'FOR UPDATE NOWAIT')
    Connection = UC
    SQL.Strings = (
      
        'select * --surname,name,midle_name,idkod,cast(w.passport as varc' +
        'har(8)) as passport,tab_no,adress,date_employment,date_dismissal'
      'from enterprise.workers w '
      'where w.key=:akey')
    Options.SetFieldsReadOnly = False
    Left = 280
    Top = 104
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'akey'
      end>
  end
  object ds_nu: TUniDataSource
    DataSet = q_nu
    Left = 336
    Top = 56
  end
  object q_nu: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO enterprise.knuz'
      
        '  (knuz, name, name_full, knuz_kind, formula, calc_priority, "13' +
        'zp", podatok, socstrah, zaniatist, prof, premiya, alimenty, inex' +
        'aciya, esv, seredne, likarniani, vidpustka, result, proc_order)'
      'VALUES'
      
        '  (:knuz, :name, :name_full, :knuz_kind, :formula, :calc_priorit' +
        'y, :"13zp", :podatok, :socstrah, :zaniatist, :prof, :premiya, :a' +
        'limenty, :inexaciya, :esv, :seredne, :likarniani, :vidpustka, :r' +
        'esult, :proc_order)'
      'returning "key"')
    SQLDelete.Strings = (
      'DELETE FROM enterprise.knuz'
      'WHERE'
      '  knuz = :Old_knuz')
    SQLUpdate.Strings = (
      'UPDATE enterprise.knuz'
      'SET'
      
        '  key = :key, knuz = :knuz, name = :name, name_full = :name_full' +
        ', knuz_kind = :knuz_kind, formula = :formula, calc_priority = :c' +
        'alc_priority, "13zp" = :"13zp", podatok = :podatok, socstrah = :' +
        'socstrah, zaniatist = :zaniatist, prof = :prof, premiya = :premi' +
        'ya, alimenty = :alimenty, inexaciya = :inexaciya, esv = :esv, se' +
        'redne = :seredne, likarniani = :likarniani, vidpustka = :vidpust' +
        'ka, result = :result, proc_order = :proc_order'
      'WHERE'
      '  knuz = :Old_knuz')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.knuz'
      'WHERE'
      '  knuz = :Old_knuz'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      
        'SELECT key, knuz, name, name_full, knuz_kind, formula, calc_prio' +
        'rity, "13zp", podatok, socstrah, zaniatist, prof, premiya, alime' +
        'nty, inexaciya, esv, seredne, likarniani, vidpustka, result, pro' +
        'c_order FROM enterprise.knuz'
      'WHERE'
      '  knuz = :knuz')
    Connection = UC
    SQL.Strings = (
      'select *'
      'from'
      'enterprise.knuz k'
      'order by k.knuz')
    Options.SetFieldsReadOnly = False
    Left = 336
    Top = 104
  end
  object ds_timesh: TUniDataSource
    DataSet = q_timesh
    Left = 384
    Top = 56
  end
  object q_timesh: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO enterprise.timesheet'
      '  ( godmesr, godmesn, cp, dp, cf, df, summa)'
      'VALUES'
      '  ( :godmesr, :godmesn, :cp, :dp, :cf, :df, :summa)'
      'returning "key"')
    SQLDelete.Strings = (
      'DELETE FROM enterprise.timesheet'
      'WHERE'
      '  key = :Old_key')
    SQLUpdate.Strings = (
      'UPDATE enterprise.timesheet'
      'SET'
      
        '  key = :key, godmesr = :godmesr, godmesn = :godmesn, cp = :cp, ' +
        'dp = :dp, cf = :cf, df = :df, summa = :summa'
      'WHERE'
      '  key = :Old_key')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.timesheet'
      'WHERE'
      '  key = :Old_key'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      
        'SELECT key, godmesr, godmesn, cp, dp, cf, df, summa FROM enterpr' +
        'ise.timesheet'
      'WHERE'
      '  key = :key')
    Connection = UC
    SQL.Strings = (
      
        'select t.key,t.godmesr,t.godmesn,t.tab_no||'#39'_'#39'||w.surname||'#39' '#39'||' +
        'substr(w.name,1,1)||'#39'. '#39'||substr(w.midle_name,1,1)||'#39'.'#39' as tab_n' +
        'o,t.knuz||'#39'_'#39'||k.name as knuz,t.cp,t.dp,t.cf,t.df,t.summa,t.perc' +
        'ent'
      'from enterprise.timesheet t '
      'left outer join enterprise.workers w on t.tab_no=w.tab_no '
      'left outer join enterprise.knuz k on t.knuz=k.knuz '
      'WHERE t.tab_no=:atab and t.godmesr=(select a."YM" '
      'from enterprise.activemonth a'
      'where a.active=1)')
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.ReturnParams = True
    Left = 384
    Top = 104
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'atab'
      end>
  end
  object ds_timesh_nod: TUniDataSource
    DataSet = q_timesh_nod
    Left = 440
    Top = 56
  end
  object q_timesh_nod: TUniQuery
    Connection = UC
    SQL.Strings = (
      
        'SELECT cast(:aym as varchar(15)) as godmesr, CAST(null as varcha' +
        'r(15)) as root,cast(m.month_name as varchar(15))'
      
        'from enterprise.workers s left outer join enterprise.month m on ' +
        'cast(:aym as integer)%100=m.month_number'
      
        'where s.date_employment<=date('#39'01.'#39'||case WHEN :aym%100=12 then ' +
        #39'01'#39' else :aym%100+1 end ||'#39'.'#39'|| case WHEN :aym%100=12 then trun' +
        'c(:aym/100)+1 else trunc(:aym/100) end)-1 and s.date_dismissal i' +
        's null'
      'GROUP by m.month_name'
      ''
      'union all'
      
        'SELECT cast(:aym||w.tab_no as varchar(15)),cast(:aym as varchar(' +
        '15)),cast(w.tab_no||'#39'_'#39'||w.surname||'#39' '#39'||substr(w.name,1,1)||'#39'. ' +
        #39'||substr(w.midle_name,1,1)||'#39'.'#39' as varchar(15))'
      'FROM enterprise.workers w '
      
        'where w.date_employment<=date('#39'01.'#39'||case WHEN :aym%100=12 then ' +
        #39'01'#39' else :aym%100+1 end ||'#39'.'#39'|| case WHEN :aym%100=12 then trun' +
        'c(:aym/100)+1 else trunc(:aym/100) end)-1 and w.date_dismissal i' +
        's null'
      'group by w.tab_no,w.surname,w.name,w.midle_name')
    Options.SetFieldsReadOnly = False
    Left = 440
    Top = 104
    ParamData = <
      item
        DataType = ftString
        Name = 'aym'
        Value = '201210'
      end>
  end
  object PostgreSQLUniProvider1: TPostgreSQLUniProvider
    Left = 32
    Top = 56
  end
  object proc_recalc_zrl: TUniStoredProc
    StoredProcName = 'enterprise.recalc_salary'
    SQLInsert.Strings = (
      'SELECT * FROM enterprise.recalc_zrl(:aym, :atab_no)')
    SQLDelete.Strings = (
      'SELECT * FROM enterprise.recalc_zrl(:aym, :atab_no)')
    SQLUpdate.Strings = (
      'SELECT * FROM enterprise.recalc_zrl(:aym, :atab_no)')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.recalc_zrl(:aym, :atab_no)')
    SQLRefresh.Strings = (
      'SELECT * FROM enterprise.recalc_zrl(:aym, :atab_no)')
    Connection = UC
    Left = 32
    Top = 104
    ParamData = <
      item
        DataType = ftBoolean
        Name = 'result'
        ParamType = ptResult
      end
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftWideString
        Name = 'atab_no'
        ParamType = ptInput
      end>
    CommandStoredProcName = 'enterprise.recalc_salary'
  end
  object q_timesh_add: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO enterprise.timesheet'
      
        '  ( godmesr, godmesn, tab_no, knuz, cp, dp, cf, df, summa, perce' +
        'nt)'
      'VALUES'
      
        '  ( :godmesr, :godmesn, :tab_no, :knuz, :cp, :dp, :cf, :df, :sum' +
        'ma, :percent)'
      'returning "key"')
    SQLDelete.Strings = (
      '--')
    SQLUpdate.Strings = (
      '--')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.timesheet'
      'WHERE'
      '  key = :Old_key'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      
        'SELECT key, godmesr, godmesn, tab_no, knuz, cp, dp, cf, df, summ' +
        'a, percent FROM enterprise.timesheet'
      'WHERE'
      '  key = :key')
    Connection = UC
    SQL.Strings = (
      'select *'
      'from enterprise.timesheet')
    Options.SetFieldsReadOnly = False
    Left = 384
    Top = 200
    object q_timesh_addkey: TIntegerField
      AutoGenerateValue = arAutoInc
      FieldName = 'key'
    end
    object q_timesh_addgodmesr: TWideStringField
      FieldName = 'godmesr'
      Size = 6
    end
    object q_timesh_addgodmesn: TWideStringField
      FieldName = 'godmesn'
      Size = 6
    end
    object q_timesh_addtab_no: TWideStringField
      FieldName = 'tab_no'
      Size = 5
    end
    object q_timesh_addknuz: TWideStringField
      FieldName = 'knuz'
      Size = 3
    end
    object q_timesh_addcp: TFloatField
      FieldName = 'cp'
    end
    object q_timesh_adddp: TFloatField
      FieldName = 'dp'
    end
    object q_timesh_addcf: TFloatField
      FieldName = 'cf'
    end
    object q_timesh_adddf: TFloatField
      FieldName = 'df'
    end
    object q_timesh_addsumma: TFloatField
      FieldName = 'summa'
    end
    object q_timesh_addpercent: TFloatField
      FieldName = 'percent'
    end
  end
  object ds_timesh_add: TUniDataSource
    DataSet = q_timesh_add
    OnStateChange = ds_timesh_addStateChange
    Left = 384
    Top = 152
  end
  object ds_aym: TUniDataSource
    Left = 648
    Top = 56
  end
  object q_aym: TUniQuery
    Connection = UC
    SQL.Strings = (
      
        'select  m.month_name||'#39' '#39'||substr(a."YM",1,4)||'#39#1088'.'#39' As aym, a."Y' +
        'M" as a_ym,o.name,o.direktor,o.glbuh'
      'from enterprise.activemonth a '
      
        #9'left outer join enterprise.month m on m.month_number =CAST(a."Y' +
        'M" as integer)%100,'
      '    enterprise.org o'
      'where a.active=1')
    Left = 648
    Top = 104
  end
  object proc_calendar_dp_cp: TUniStoredProc
    StoredProcName = 'zrl.enterprise.calc_calendar'
    Connection = UC
    Options.ReturnParams = True
    Left = 32
    Top = 168
    ParamData = <
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftSmallint
        Name = 'adp'
        ParamType = ptOutput
      end
      item
        DataType = ftSmallint
        Name = 'acp'
        ParamType = ptOutput
      end>
    CommandStoredProcName = 'zrl.enterprise.calc_calendar'
  end
  object proc_payroll_total: TUniStoredProc
    StoredProcName = 'enterprise.calc_payroll_total'
    Connection = UC
    Left = 32
    Top = 232
    ParamData = <
      item
        DataType = ftBoolean
        Name = 'result'
        ParamType = ptResult
      end
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftWideString
        Name = 'atab_no'
        ParamType = ptInput
      end>
    CommandStoredProcName = 'enterprise.calc_payroll_total'
  end
  object proc_next_aym: TUniStoredProc
    StoredProcName = 'zrl.enterprise.next_aym'
    Connection = UC
    Left = 112
    Top = 200
    ParamData = <
      item
        DataType = ftBoolean
        Name = 'result'
        ParamType = ptResult
      end
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftWideString
        Name = 'atab_no'
        ParamType = ptInput
      end>
    CommandStoredProcName = 'zrl.enterprise.next_aym'
  end
  object proc_prev_aym: TUniStoredProc
    StoredProcName = 'zrl.enterprise.prev_aym'
    Connection = UC
    Left = 176
    Top = 232
    ParamData = <
      item
        DataType = ftBoolean
        Name = 'result'
        ParamType = ptResult
      end
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftWideString
        Name = 'atab_no'
        ParamType = ptInput
      end>
    CommandStoredProcName = 'zrl.enterprise.prev_aym'
  end
  object q_sal_koef: TUniQuery
    Connection = UC
    SQL.Strings = (
      'select'
      '*'
      'from'
      'enterprise.salary_koef s'
      ''
      
        'WHERE substr(s.godmes,1,4)>=substr(enterprise.get_amy(),1,4) and' +
        ' cast(substr(s.godmes,1,4) as SMALLINT)<cast(substr(enterprise.g' +
        'et_amy(),1,4) as SMALLINT)+1')
    Left = 536
    Top = 104
  end
  object ds_sal_koef: TUniDataSource
    DataSet = q_sal_koef
    Left = 536
    Top = 56
  end
  object ucd: TUniConnectDialog
    DatabaseLabel = #1041#1072#1079#1072' '#1076#1072#1085#1085#1099#1093
    PortLabel = #1055#1086#1088#1090
    ProviderLabel = #1055#1088#1086#1074#1072#1081#1076#1077#1088
    SavePassword = True
    Caption = #1057#1086#1077#1076#1080#1085#1077#1085#1080#1077
    UsernameLabel = #1048#1084#1103
    PasswordLabel = #1055#1072#1088#1086#1083#1100
    ServerLabel = #1057#1077#1088#1074#1077#1088
    ConnectButton = #1057#1086#1077#1076#1080#1085#1080#1090#1100
    CancelButton = #1054#1090#1084#1077#1085#1072
    LabelSet = lsRussian
    Left = 136
    Top = 8
  end
  object ds_calend: TUniDataSource
    DataSet = q_calend
    Left = 600
    Top = 56
  end
  object q_calend: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO enterprise."Calendar"'
      '  (ym)'
      'VALUES'
      '  (:ym)')
    SQLDelete.Strings = (
      'DELETE FROM enterprise."Calendar"'
      'WHERE'
      '  ym = :Old_ym')
    SQLUpdate.Strings = (
      'UPDATE enterprise."Calendar"'
      'SET'
      '  ym = :ym,'
      'day['#9'1'#9']=:d1,'
      'day['#9'2'#9']=:d2,'
      'day['#9'3'#9']=:d3,'
      'day['#9'4'#9']=:d4,'
      'day['#9'5'#9']=:d5,'
      'day['#9'6'#9']=:d6,'
      'day['#9'7'#9']=:d7,'
      'day['#9'8'#9']=:d8,'
      'day['#9'9'#9']=:d9,'
      'day['#9'10'#9']=:d10,'
      'day['#9'11'#9']=:d11,'
      'day['#9'12'#9']=:d12,'
      'day['#9'13'#9']=:d13,'
      'day['#9'14'#9']=:d14,'
      'day['#9'15'#9']=:d15,'
      'day['#9'16'#9']=:d16,'
      'day['#9'17'#9']=:d17,'
      'day['#9'18'#9']=:d18,'
      'day['#9'19'#9']=:d19,'
      'day['#9'20'#9']=:d20,'
      'day['#9'21'#9']=:d21,'
      'day['#9'22'#9']=:d22,'
      'day['#9'23'#9']=:d23,'
      'day['#9'24'#9']=:d24,'
      'day['#9'25'#9']=:d25,'
      'day['#9'26'#9']=:d26,'
      'day['#9'27'#9']=:d27,'
      'day['#9'28'#9']=:d28,'
      'day['#9'29'#9']=:d29,'
      'day['#9'30'#9']=:d30,'
      'day['#9'31'#9']=:d31'
      ''
      'WHERE'
      '  ym = :Old_ym')
    SQLLock.Strings = (
      'SELECT * FROM enterprise."Calendar"'
      'WHERE'
      '  ym = :Old_ym'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      'SELECT ym FROM enterprise."Calendar"'
      'WHERE'
      '  ym = :ym')
    Connection = UC
    SQL.Strings = (
      'select'
      
        'c.ym,c.day[1] as d1,c.day[2]as d2,c.day[3] as d3,c.day[4] as d4,' +
        'c.day[5] as d5,'
      
        'c.day[6] as d6,c.day[7] as d7,c.day[8] as d8,c.day[9] as d9,c.da' +
        'y[10] as d10,'
      
        'c.day[11] as d11,c.day[12] as d12,c.day[13] as d13,c.day[14] as ' +
        'd14,'
      
        'c.day[15] as d15,c.day[16] as d16,c.day[17] as d17,c.day[18] as ' +
        'd18,'
      
        'c.day[19] as d19,c.day[20] as d20,c.day[21] as d21,c.day[22] as ' +
        'd22,'
      
        'c.day[23] as d23,c.day[24] as d24,c.day[25] as d25,c.day[26] as ' +
        'd26,'
      
        'c.day[27] as d27,c.day[28] as d28,c.day[29] as d29,c.day[30] as ' +
        'd30,c.day[31] as d31'
      ''
      'FROM'
      'enterprise."Calendar" c'
      'order by c.ym')
    Options.SetFieldsReadOnly = False
    Left = 600
    Top = 104
  end
  object styl1: TcxStyleRepository
    Left = 296
    Top = 216
    PixelsPerInch = 96
    object styl_red: TcxStyle
      AssignedValues = [svTextColor]
      TextColor = clRed
    end
  end
  object ds_fond: TUniDataSource
    DataSet = q_fond
    Left = 488
    Top = 152
  end
  object q_fond: TUniQuery
    SQLInsert.Strings = (
      'INSERT INTO enterprise.fond'
      '  (ym, fond_name, tab_no)'
      'VALUES'
      '  (:ym, :fond_name, :tab_no)')
    SQLDelete.Strings = (
      'DELETE FROM enterprise.fond'
      'WHERE'
      '  fond_name = :Old_fond_name')
    SQLUpdate.Strings = (
      'UPDATE enterprise.fond'
      'SET'
      '  ym = :ym, fond_name = :fond_name, tab_no = :tab_no'
      'WHERE'
      '  fond_name = :Old_fond_name')
    SQLLock.Strings = (
      'SELECT * FROM enterprise.fond'
      'WHERE'
      '  fond_name = :Old_fond_name'
      'FOR UPDATE NOWAIT')
    SQLRefresh.Strings = (
      'SELECT ym, fond_name, tab_no FROM enterprise.fond'
      'WHERE'
      '  fond_name = :fond_name')
    Connection = UC
    SQL.Strings = (
      'select'
      'c.fond_name,c.tab_no,'
      
        'c.ym,c.day[1] as d1,c.day[2]as d2,c.day[3] as d3,c.day[4] as d4,' +
        'c.day[5] as d5,'
      
        'c.day[6] as d6,c.day[7] as d7,c.day[8] as d8,c.day[9] as d9,c.da' +
        'y[10] as d10,'
      
        'c.day[11] as d11,c.day[12] as d12,c.day[13] as d13,c.day[14] as ' +
        'd14,'
      
        'c.day[15] as d15,c.day[16] as d16,c.day[17] as d17,c.day[18] as ' +
        'd18,'
      
        'c.day[19] as d19,c.day[20] as d20,c.day[21] as d21,c.day[22] as ' +
        'd22,'
      
        'c.day[23] as d23,c.day[24] as d24,c.day[25] as d25,c.day[26] as ' +
        'd26,'
      
        'c.day[27] as d27,c.day[28] as d28,c.day[29] as d29,c.day[30] as ' +
        'd30,c.day[31] as d31'
      ''
      'FROM'
      'enterprise.fond c'
      'order by c.ym,c.fond_name')
    Left = 488
    Top = 200
  end
  object ds_: TUniDataSource
    Enabled = False
    Left = 536
    Top = 152
  end
  object UniQuery1: TUniQuery
    Connection = UC
    SQL.Strings = (
      'select 1')
    Left = 536
    Top = 200
  end
  object proc_payroll_monthly: TUniStoredProc
    StoredProcName = 'enterprise.calc_payroll_monthly'
    Connection = UC
    Left = 32
    Top = 304
    ParamData = <
      item
        DataType = ftBoolean
        Name = 'result'
        ParamType = ptResult
        Value = True
      end
      item
        DataType = ftWideString
        Name = 'aym'
        ParamType = ptInput
      end
      item
        DataType = ftWideString
        Name = 'atab_no'
        ParamType = ptInput
      end>
    CommandStoredProcName = 'enterprise.calc_payroll_monthly'
  end
  object ER_: TcxEditRepository
    Left = 264
    Top = 296
    object ER_sum: TcxEditRepositoryCurrencyItem
      Properties.DisplayFormat = ',0.00'
      Properties.UseLeftAlignmentOnEditing = False
    end
  end
end
